package com.ruoyi.users.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户信息对象 users
 * 
 * @author anyunyi
 * @date 2025-05-29
 */
public class Users extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户ID（读者/管理员） */
    private Long id;

    /** 账号（手机号/邮箱） */
    @Excel(name = "账号", readConverterExp = "手=机号/邮箱")
    private String username;

    /** 密码（加密存储） */
    @Excel(name = "密码", readConverterExp = "加=密存储")
    private String password;

    /** 姓名 */
    @Excel(name = "姓名")
    private String name;

    /** 性别（0-保密，1-男，2-女） */
    @Excel(name = "性别", readConverterExp = "0=-保密，1-男，2-女")
    private Long gender;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    /** 邮箱 */
    @Excel(name = "邮箱")
    private String email;

    /** 角色（1-读者，2-管理员，3-超级管理员） */
    @Excel(name = "角色", readConverterExp = "1=-读者，2-管理员，3-超级管理员")
    private Long role;

    /** 状态（1-正常，2-冻结） */
    @Excel(name = "状态", readConverterExp = "1=-正常，2-冻结")
    private Long status;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }
    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setGender(Long gender) 
    {
        this.gender = gender;
    }

    public Long getGender() 
    {
        return gender;
    }
    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }
    public void setEmail(String email) 
    {
        this.email = email;
    }

    public String getEmail() 
    {
        return email;
    }
    public void setRole(Long role) 
    {
        this.role = role;
    }

    public Long getRole() 
    {
        return role;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("username", getUsername())
            .append("password", getPassword())
            .append("name", getName())
            .append("gender", getGender())
            .append("phone", getPhone())
            .append("email", getEmail())
            .append("role", getRole())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .toString();
    }
}
